package com.hyperfix.washer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.hyperfix.models.washer.dtos.StationDTO;
import com.hyperfix.models.washer.pojos.Station;
import com.hyperfix.models.washer.vos.StationQueryVO;
import com.hyperfix.models.washer.vos.StationVO;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

/**
 * @author JiangChunYu
 * 2024/4/17
 */
@Mapper
public interface StationMapper extends BaseMapper<Station> {
    IPage<StationDTO> listStation(IPage<StationDTO> stationDTOIPage, @Param("param") StationQueryVO stationQueryVO);

    @Update("update station set name = #{name}, position = #{position}, type=#{type} where id = #{id}")
    boolean updateStation(StationVO stationVO);
}
